<?php 
// back page
include_once("../UserIncludes/DbConfig.php");
include_once("../UserIncludes/DataTables.php");

$str="";
if($_REQUEST['mode']=='state')
{
$check_stateSQL = "SELECT stateId, state_name FROM ".STATE." WHERE country_code = '".$_REQUEST['countryId']."' order by state_name";

$check_stateRS = mysql_query($check_stateSQL) or die(mysql_error());
if(mysql_num_rows($check_stateRS)>0)
{
	while($result=mysql_fetch_array($check_stateRS))
	{
		$str .= $result['stateId'].",".$result['state_name']."_";//echo  $select_sub_property_fetch['auto_id'] ;
	}
}
else
{
	$str .= ",Select a State_";
}
}
echo substr($str,0,-1)."^1";

//echo $str."^2";
?>
